<?php load_header() ?>

<?php #content ?>
<div class="row">
    <div class="action-tools container-fluid">
        <div class="page-header">User Management</div>
        <div class="pull-right">
            <?php echo anchor(PANEL_URL . '/user/show_add_form', '<i class="fa fa-plus"></i> New', 'class="btn btn-primary"') ?>
        </div>
    </div>

    <div class="container-fluid">

        <table class="table table-condensed table-hover">
            <thead>
                <tr>
                    <th>Action</th>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th style="max-width:100px">Email</th>
                    <th>Contact Number</th>
                    <th style="max-width:50px">Status</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($user_list->result() as $i => $row): ?>
                    <tr>
                        <td>
                            <?php
                            echo anchor(PANEL_URL . '/user/show_edit_form/' . $row->user_id, '<i class="fa fa-edit"></i>');
                            echo nbs(2);
                            echo anchor(PANEL_URL . '/user/delete/' . $row->user_id, '<i class="fa fa-trash"></i>');
                            ?>
                        </td>
                        <td><?php echo $row->firstname; ?></td>
                        <td><?php echo $row->lastname; ?></td>
                        <td><?php echo $row->email; ?></td>
                        <td><?php echo $row->contact_number; ?></td>
                        <td class="center"><?php echo ($row->enable == 1) ? 'Enabled' : 'Disabled'; ?></td>
                    </tr>
<?php endforeach ?>
            </tbody>
        </table>
    </div>
</div>

<?php load_content_footer() ?>

<?php #place javascript for this page bellow ?>
<script>

</script>

<?php #this page is closed by this footter  ?>
<?php load_footer() ?>